package com.syedu.cels.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * description：单词类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
//子类equals()和hashCode()包括父类的属性
@EqualsAndHashCode(callSuper = true)
public class Word extends Base {
    //特有属性
    private Character first;//首字母

    public Word(String en, List<String> cn) {
        super(en, cn);
        setFirst(Character.toUpperCase(en.charAt(0)));
    }

    @Override
    public String toString() {
        return super.toString();
    }
}